package first;

import java.util.List;
import java.util.Map;

import construtor.Actable;
import construtor.Instrument;

/**
 * 演员类
 * 
 * @author Wangpeihu
 * @team [Never give up]
 * @since JDK1.6(建议)
 * @date 2010-2-4
 */
public class Actor implements Actable {

	public Map<String, Instrument> getOtherInstrument() {
		return otherInstrument;
	}

	public void setOtherInstrument(Map<String, Instrument> otherInstrument) {
		this.otherInstrument = otherInstrument;
	}

	public List<?> getSkill() {
		return skill;
	}

	private List<?> skill;
	private String name;
	private int age;
	private Instrument instrument;
	private Map<String, Instrument> otherInstrument;

	public void setSkill(List<?> skill) {
		this.skill = skill;
	}

	public void updateName() {
		name = name + ".china";
	}

	public void setAge(int age) {
		this.age = age;
	}

	public int getAge() {
		return age;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Instrument getInstrument() {
		return instrument;
	}

	public void setInstrument(Instrument instrument) {
		this.instrument = instrument;
	}

	@Override
	public void act() {
		instrument.play();
		introduce();
	}

	/**
	 * 自我介绍
	 */
	private void introduce() {
		String info = "I am " + name + ".My age is" + age;
		System.out.println(info);
		System.out.println(skill);
		System.out.println(otherInstrument);
	}

}
